package chapter05.example05;

public class example05 {
    public static void main(String[] args){
        String s1 = " String";
        String s2 = " Str";
        System.out.println("判断是否以字符串Str开头："+s1.startsWith("Str"));
        System.out.println("判断是否以字符串ng结尾："+s1.startsWith("ng"));
        System.out.println("判断是否包含符串tri："+s1.startsWith("tri"));
        System.out.println("判断字符串是否为空："+s1.isEmpty());
        System.out.println("判断两个字符串是否相等："+ s1.equals(s2));

    }
}
